package artid.com.arttogo.bean;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.io.Serializable;
import java.util.ArrayList;

/**
 * 
*    
* 项目名称：ArtworkArt   
* 类名称：AuctionArtistListParser   
* 类描述：拍卖行艺术家列表实体类+解析   
* 创建人：耿卫斌   
* 创建时间：2017-3-10 下午2:24:13   
*
 */
public class LotMsg extends AppItem implements Serializable {
	
	
	String id;
	String lot_author;
	String lot_age;
	String lot_size;
	String lot_material;
	String lot_mounting;
	String lot_memo;
	String chart_num;
	String lot_recording;
	String lot_officialseal;
	String lot_abook;
	String lot_class;
	ArrayList<Historyinfo> listInfo;
	
	@Override
	public void parse(JSONObject object) {
		// TODO Auto-generated method stub
		if (null == object) {
			return;
		}
		listInfo = new ArrayList<Historyinfo>();
		JSONObject obj = object.optJSONObject("lotinfo");
		id = obj.optString("id");
		lot_author = obj.optString("lot_author");
		lot_age = obj.optString("lot_age");
		lot_size = obj.optString("lot_size");
		lot_material = obj.optString("lot_material");
		lot_mounting = obj.optString("lot_mounting");
		lot_memo = obj.optString("lot_memo");
		chart_num = obj.optString("chart_num");
		lot_recording = obj.optString("lot_recording");
		lot_officialseal = obj.optString("lot_officialseal");
		lot_abook = obj.optString("lot_abook");
		lot_class = obj.optString("lot_class");
		JSONArray array = object.optJSONArray("historyinfo");
		for (int i = 0; i < array.length(); i++) {
			JSONObject item;
			try {
				item = array.getJSONObject(i);
				Historyinfo info = new Historyinfo();
				info.setAuction_start_time(item.optString("auction_start_time"));
				info.setAuction_title(item.optString("auction_title"));
				info.setJigou_id(item.optString("jigou_id"));
				info.setJigou_logo(item.optString("jigou_logo"));
				info.setLot_price(item.optString("lot_price"));
				info.setMom_price(item.optString("mom_price"));
				info.setMom_status(item.optString("mom_status"));
				info.setSeller_name(item.optString("seller_name"));
				info.setSpecial_title(item.optString("special_title"));
				info.setUnit(item.optString("unit"));
				listInfo.add(info);
			} catch (JSONException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			
		}

	}

	
	public String getLot_class() {
		return lot_class;
	}


	public void setLot_class(String lot_class) {
		this.lot_class = lot_class;
	}


	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getLot_author() {
		return lot_author;
	}

	public void setLot_author(String lot_author) {
		this.lot_author = lot_author;
	}

	public String getLot_age() {
		return lot_age;
	}

	public void setLot_age(String lot_age) {
		this.lot_age = lot_age;
	}

	public String getLot_size() {
		return lot_size;
	}

	public void setLot_size(String lot_size) {
		this.lot_size = lot_size;
	}

	public String getLot_material() {
		return lot_material;
	}

	public void setLot_material(String lot_material) {
		this.lot_material = lot_material;
	}

	public String getLot_mounting() {
		return lot_mounting;
	}

	public void setLot_mounting(String lot_mounting) {
		this.lot_mounting = lot_mounting;
	}

	public String getLot_memo() {
		return lot_memo;
	}

	public void setLot_memo(String lot_memo) {
		this.lot_memo = lot_memo;
	}

	public String getChart_num() {
		return chart_num;
	}

	public void setChart_num(String chart_num) {
		this.chart_num = chart_num;
	}

	public String getLot_recording() {
		return lot_recording;
	}

	public void setLot_recording(String lot_recording) {
		this.lot_recording = lot_recording;
	}

	public String getLot_officialseal() {
		return lot_officialseal;
	}

	public void setLot_officialseal(String lot_officialseal) {
		this.lot_officialseal = lot_officialseal;
	}

	public String getLot_abook() {
		return lot_abook;
	}

	public void setLot_abook(String lot_abook) {
		this.lot_abook = lot_abook;
	}

	public ArrayList<Historyinfo> getListInfo() {
		return listInfo;
	}

	public void setListInfo(ArrayList<Historyinfo> listInfo) {
		this.listInfo = listInfo;
	}
	
	
	
}
